

const config = require('./config.js');


const {Buffer} = require('node:buffer');
const crypto = require('node:crypto');
const secp256k1 = require('secp256k1');
const {keccak256} = require("ethereumjs-util");
const {ethers}  = require('ethers');

const anchor = require('@coral-xyz/anchor');

const { Keypair, PublicKey } = require('@solana/web3.js');



const ProgramOutApp = require('./program_outapp');
const main = async ()=> {

    let program = new ProgramOutApp(config.nodeUrl);

    let network_id =  new anchor.BN(1);
    let contract_address = Buffer.from("91SBHChzeGAFUkfKfSJHQSrGcLt5LQGuVy4v3RQu1YyC");
    let functionCallData = Buffer.from("hello world");

    let ret = await program.outboundCall(network_id, contract_address, functionCallData);
    console.log('ret: ', ret);

}

main();